Release 10.1A: OpenEdge Getting Started:
New and Revised Features
Highlights of the LOAD-RESULT-INTO phrase
In Release 10.1A, the
LOAD-RESULT-INTOphrase provides a third, alternative technique to populate temp-tables directly in the 4GL using theRUN STORED-PROCstatement. (In Release 10.1A, theproc-text-bufferand the native views techniques are maintained for backward compatibility to earlier versions of the Progress 4GL.) This new technique to load results from a foreign data source into a temp-table offers several enhancements over the previously noted techniques. UsingLOAD-RESULT-INTO, you can:
- Specify one or more temp-table handle elements to retrieve stored procedure result sets and have the DataServer load the result set data directly into the associated temp-tables.
- Have direct access to the fields defined in the temp-tables.
- Employ a new adaptation of
ROWIDfunctionality, which in turn supports an alternative means to populate temp-tables of a ProDataSet Object.Figure 2–1 presents a code example in which the 4GL uses the
RUN STORED-PROCstatement with thesend-sql-statementoption. Thesend-sql-statementoption allows native SQL to be passed as a parameter and executed like a stored procedure by the foreign data source.
Figure 2–1: RUN STORED-PROC statement with send-sql-statement example
Native procedures stored by the foreign data source can also be executed from the
RUN STORED-PROCstatement by replacing the phrasesend-sql-statementwith the name that identifies the stored procedure in the foreign data source. If either approach produces a result set, the result set must then be handled by the 4GL before the procedure can be closed. Prior to the availability of theLOAD-RESULT-INTOoption, the two older techniques,proc-text-bufferand native views, were available to process the results of aRUN STORED-PROC.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |